/*
 * @Author: zhangweinan
 * @Date: 2023-03-23 15:47:28
 * @LastEditors: zhangweinan
 * @LastEditTime: 2023-03-24 16:13:10
 * @Description: file content
 * @FilePath: \front-end-of-task-center\src\api\bpm\formGroup.js
 */

import request from '@/utils/request'

//获取分组列表
export function getTreeList(query) {
  return request({
    url: `/bpm/formGroup/list`,
    method: 'get'
  })
}
//保存流程分组
export function create(data) {
  return request({
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    url: '/bpm/formGroup/create',
    method: 'post',
    data: data
  })
}
//修改分组名称
export function update(data) {
  return request({
    url: `/bpm/formGroup/update`,
    method: 'put',
    data
  })
}

//删除分组
export function deleteGroup(data) {
  return request({
    url: `/bpm/formGroup/delete?id=${data}`,
    method: 'delete'
  })
}
//表单发布/启用/停用
export function updateStatus(data) {
  return request({
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    url: `/bpm/form/updateStatus`,
    method: 'post',
    data
  })
}
//更改表单基本信息
export function updateName(data) {
  return request({
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    url: `/bpm/form/updateName`,
    method: 'post',
    data
  })
}
//批量移动
export function updateCategorys(data) {
  return request({
    url: `/bpm/form/updateCategorys`,
    method: 'post',
    data
  })
}


